package com.recruit.g1.common.pager;
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

import io.swagger.annotations.ApiModelProperty;

/**
 * 封装分页查询的类
 */
public class BasePageQuery {
    @ApiModelProperty("页码")
    protected Integer pageNo;
    @ApiModelProperty("每页数据量")
    protected Integer pageSize;

    public BasePageQuery() {
    }

    public BasePageQuery(Integer pageSize, Integer pageNo) {
        if (pageNo == null) {
            pageNo = 1;
        }

        if (pageSize == null) {
            pageSize = 10;
        }

        this.pageSize = pageSize;
        this.pageNo = pageNo;
    }

    public Integer getPageSize() {
        return this.pageSize != null && this.pageSize != 0 ? this.pageSize : 10;
    }

    public Integer getPageNo() {
        return this.pageNo != null && this.pageNo != 0 ? this.pageNo : 1;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }
}
